﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Runda.EShop.Common.Utility;
using System.Data;
using Runda.EShop.Bll;
using Runda.EShop.Common.Entity;

namespace Runda.EShop.SaaS
{
    public partial class Default : BasePage
    {
        public override string FunctionID
        {
            get
            {
                return "Func00";
            }
        }

        public override bool IsCheckAccessible
        {
            get
            {
                return false;
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                Initialize();
            }
        }

        private void Initialize()
        {  
           //公告
           List<SqlDbParameter> parms = new List<SqlDbParameter>();
            int RecordCount = 0;
            SysNoticeBll bll = new SysNoticeBll();
            List<SysNoticeEntity> list = bll.GetNoticeListNonContent(parms, " CreatedAt DESC", 6, 0, out RecordCount);

            rptNoticeList.DataSource = list;
            rptNoticeList.DataBind();

            //同步日志
            parms = new List<SqlDbParameter>();
            SqlDbParameter parm = new SqlDbParameter();
            parm.ColumnType = DbType.Int32;
            parm.ParameterValue = 10;
            parm.QualificationType = SqlDbParameter.QualificationSymbol.Top;
            parms.Add(parm);

            rptSyncLog.DataSource = bll.GetAll<SysLogSyncEntity>(parms," order by CreatedAt desc");
            rptSyncLog.DataBind();
        }
    }
}